<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="layouts/default"
      th:with="activeTab='profile'"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>FundRequest - Profile</title>
</head>
<body>

<div layout:fragment="content">
    <th:block th:replace="pages/profile/fragments/header :: header"></th:block>
    <div class="row justify-content-center">
        <div class="col-12">
            <div class="card mb-5">
                <a class="anchor" id="referral-link"></a>
                <h5 class="card-header card-header--label">
                    <span>Personal referral link</span>
                    <small class="text-muted">Rewards 5 FND for each verified developer</small>
                </h5>
                <div class="card-body">
                    <div class="card-text mb-3">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <button class="btn btn-default mb-0" data-clipboard-target="#referral-link-field">
                                    <i class="fa fa-clipboard"></i>
                                </button>
                            </div>
                            <input class="form-control form-control--not-editable" id="referral-link-field"
                                   title="personal referral link"
                                   value="https://xyz.testReferralLink-Copy" th:value="${refLink}" readonly="readonly"/>
                        </div>
                    </div>

                    <div class="card-text text-center">
                        <a class="btn btn-outline-linkedin icon-left mb-2 mb-md-0" data-open-link-in-popup="true"
                           th:href="${refShareLinkedin.link}"
                           rel="noopener noreferrer" target="_blank">
                            <i class="fab fa-linkedin"></i>
                            <span>Share on LinkedIn</span>
                        </a>
                        <a class="btn btn-outline-twitter icon-left mb-2 mb-md-0" data-open-link-in-popup="true"
                           th:href="${refShareTwitter.link}"
                           rel="noopener noreferrer" target="_blank">
                            <i class="fab fa-twitter"></i>
                            <span>Share on Twitter</span>
                        </a>
                        <a class="btn btn-outline-facebook icon-left mb-0" data-open-link-in-popup="true"
                           th:href="${refShareFacebook.link}"
                           rel="noopener noreferrer" target="_blank">
                            <i class="fab fa-facebook"></i>
                            <span>Share on facebook</span>
                        </a>
                    </div>
                </div>
            </div>

            <div class="card mb-5">
                <a class="anchor" id="verify-developer"></a>
                <h5 class="card-header card-header--label">
                    <span th:if="${profile.isVerifiedDeveloper()}">You're verified as a developer!</span>
                    <span th:unless="${profile.isVerifiedDeveloper()}">Verify yourself as a developer ...</span>
                    <small class="text-muted">Rewards up to 25 FND</small>
                </h5>
                <div class="card-body text-center">
                    <div class="row">
                        <div class="col-12 col-md-6 mb-4 mb-md-0">
                            <div th:replace="pages/profile/fragments/developer :: block(platform=${profile.getGithub()},verified=${isVerifiedGithub}, title='Github', platformName='github', verification=${githubVerification})"></div>
                        </div>

                        <div class="col-12 col-md-6 mb-0">
                            <div th:replace="pages/profile/fragments/developer :: block(platform=${profile.getStackoverflow()},verified=${isVerifiedStackOverflow}, title='Stack Overflow', platformName='stack-overflow', verification=${stackOverflowVerification})"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="card mb-5" th:if="${@environment.getProperty('io.fundrequest.ethereum.network') eq '42'}">
                <a class="anchor" id="faucet"></a>
                <h5 class="card-header card-header--label">
                    <span>FundRequest Faucet</span>
                    <small class="text-muted">Get your (test) FND here!</small>
                </h5>
                <div class="card-body text-center">
                    <div class="card-text text-center">
                       <faucet th:attr="'v-bind:name'='&quot;eth-address&quot;','v-bind:address'=${'&quot;'+profile.getEtherAddresses()+'&quot;'}"></faucet>
                        <div class="text-secondary font-weight-bold"
                             th:classappend="${profile.hasEtherAddress() ? 'd-none' : ''}"
                             data-edit-empty-message="eth-address">
                            Please enter your ETH address above, in order to receive to receive test FND.
                        </div>
                    </div>
                </div>
            </div>


            <section class="mb-2" id="faq" ref="faq">
                <faq v-bind:location="'/rest/faq/profile'"></faq>
            </section>
        </div>
    </div>
</div>

<th:block layout:fragment="modals">
</th:block>

<th:block layout:fragment="scripts">
</th:block>

</body>
</html>